package work.linruchang.oauthresourceproject.config.oauth;

import cn.hutool.core.collection.ConcurrentHashSet;
import work.linruchang.oauthresourceproject.bean.ThirdSystemInfo;

import java.util.concurrent.ConcurrentHashMap;

/**
 * 系统缓存
 *
 * @author LinRuChang
 * @version 1.0
 * @date 2022/08/21
 * @since 1.8
 **/
public class CacheInfo {
    /**
     * key：内部定义的授权唯一标识
     * value:客户端授权信息
     */
    public static ConcurrentHashMap<String, AuthorizeInfo> cacheAuthorizeInfo = new ConcurrentHashMap();
    /**
     * key：内部定义的授权唯一标识
     * value:系统定义的客户端信息
     */
    public static ConcurrentHashMap<String, ThirdSystemInfo> cacheClientInfo = new ConcurrentHashMap();
    /**
     * key：客户端ID
     * value：授权码
     */
    public static ConcurrentHashMap<String, ConcurrentHashSet<String>> cacheClientAuthCode = new ConcurrentHashMap();
    /**
     * key：授权码
     * value：用户所有授权信息
     */
    public static ConcurrentHashMap<String, AllAuthInfo> cacheAuthCodeAllAuthInfo = new ConcurrentHashMap();
    /**
     * key：客户端访问密钥
     * value：用户所有授权信息
     */
    public static ConcurrentHashMap<String, AllAuthInfo> cacheAccessTokenAllAuthInfo = new ConcurrentHashMap();

}
